<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var a=Number(prompt("请输入体重(kg)"))
    var b=Number(prompt("请输入身高(m)"))
    var c=a/b**2
    if(c<18.5){
        alert("偏瘦")
    }else if(c>=18.5&&c<20.9){
        alert("苗条")
    }else if(c>=20.9&&c<24.9){
        alert("适中")
    }else if(c>=24.9){
        alert("偏胖")
    }
</script>